﻿@model Sistema_de_Gestión_de_Correspondencia.Models.Correo

@{
    ViewBag.Title = "SGC - Detalle Correo";
}

<div style="width:100%; float:left">
    <h3 style="float:left">Detalle Correo</h3>
    <div style="float:right">@Html.ActionLink("Editar", "Edit", new { id=Model.idCorreo }) | @Html.ActionLink("Volver", "Index", new { tipo = Model.FK_idTipoCorreo })</div>
</div>
<hr />

<fieldset style="float:left;"><legend></legend>
        <div style="width:100%; float:left">
            <div style="float:right">
                @Model.fecha.ToLongDateString() - @Model.fecha.ToLongTimeString()
          </div>
        </div>

        <div style="width:100%; float:left;">
        		<label style="width:7%; float:left;">De: </label>
        		@Html.TextBoxFor(model => model.remitente, new { style = "width: 92%; float: right;", @readonly = "true" })
        </div>

        <div style="width:100%; float:left;">
        		<label style="width:7%; float:left;">Para: </label>
        		@Html.TextBoxFor(model => model.remitido, new { style = "width: 92%; float: right;", @readonly = "true" })
        </div>

        <div style="width:100%; float:left;">
        	<div style="width:50%; float:left;">
        		<label style="width:14%; float:left;">CC: </label>
            @Html.TextBoxFor(model => model.cc, new { style = "width: 85%; float: right;", @readonly = "true" })
            </div>
            <div style="width:50%; float:right;">
        		<label style="width:14%; float:left;">BCC: </label>
            @Html.TextBoxFor(model => model.bcc, new { style = "width: 85%; float: right;", @readonly = "true" })
            </div>
        </div>
        
      <div style="width:100%; float:left;">
        	<label style="width:7%; float:left;">Asunto: </label>
        	@Html.TextBoxFor(model => model.asunto, new { style = "width: 92%;", @readonly = "true" })
        </div>
        
        
            <hr />

      @Html.TextAreaFor(model => model.cuerpo, new { style = "height: 250px; width: 99%;", @readonly = "true" })
      
      <div style="width:100%; float:left">
          <div style="float:left">
            Tipo:
            @ViewBag.tipo
          </div>
            <div style="float:right">
        		Medio: 
                @if (@Model.medio_0E_1F == true)
                {
                    <text>Físico</text>
                }
                else
                {
                     <text>Electrónico</text>
                }
            </div>
        </div>
        <hr />

        <label style="float:left"><strong>Documentos:</strong></label>

        <div style="width:100%; float:left;">
            <table cellpadding="3px" style="width:auto;">
            @foreach (var item in Model.DocumentoAdjuntoes)
            {
                <tr>
                    <td>@item.nombre</td>
                    <td>@Html.ActionLink("Descargar", "Download", new { id = item.idDocumento })</td>
                </tr>
            }
            </table>
            </div>
    </fieldset>